home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / comm2 / termsorc.lha / Extras / Source / gtlayout-source.lha / LTP_RenderArrow.c < prev    next >
C/C++ Source or Header  |  1995-09-24  |  851b  |  47 lines

  1. /*  GadTools layout toolkit
  2. **
  3. **  Copyright © 1993-1995 by Olaf `Olsen' Barthel
  4. **  Freely distributable.
  5. */
  6.  
  7. #include "gtlayout_global.h"
  8.  
  9. #ifdef DO_TAPEDECK_KIND
  10. VOID __regargs
  11. LTP_RenderArrow(struct RastPort *RPort,BOOLEAN LeftDirection,LONG Left,LONG Top,LONG Width,LONG Height)
  12. {
  13.     LONG i,Len,Start;
  14.  
  15.     if(LeftDirection)
  16.     {
  17.         for(i = 0 ; i < Width ; i++)
  18.         {
  19.             Len    = ((Height * (i + 1)) / Width) & ~1;
  20.  
  21.             if(Len < Height)
  22.                 Len++;
  23.  
  24.             Start    = Top + (Height - Len) / 2;
  25.  
  26.             Move(RPort,Left + i,Start);
  27.             Draw(RPort,Left + i,Start + Len - 1);
  28.         }
  29.     }
  30.     else
  31.     {
  32.         for(i = 0 ; i < Width ; i++)
  33.         {
  34.             Len    = ((Height * (i + 1)) / Width) & ~1;
  35.  
  36.             if(Len < Height)
  37.                 Len++;
  38.  
  39.             Start    = Top + (Height - Len) / 2;
  40.  
  41.             Move(RPort,Left + Width - 1 - i,Start);
  42.             Draw(RPort,Left + Width - 1 - i,Start + Len - 1);
  43.         }
  44.     }
  45. }
  46. #endif    /* DO_TAPEDECK_KIND */
  47.